package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by sss on 2016/9/1.
 */
@Entity
@DynamicInsert
@Table(name = "gc_rmtype_avail_sync", catalog = "")
public class GcRmtypeAvailSync extends BaseEntity{
    private Date occDate;
    private String rmclass;
    private String rmtype;
    private Integer rmtypeNum;
    private Integer limitNum;
    private Integer oooNum;
    private Integer osNum;
    private Integer villaNum;
    private Integer sureBookNum;
    private Integer unsureBookNum;
    private Integer haltNum;
    private Integer depNum;
    private Integer saleNum;
    private int avail;
    private int availWithLimit;
    private String l2RRmtype;

    @Basic
    @Column(name = "avail", nullable = true)
    public int getAvail() {
        return avail;
    }

    public void setAvail(int avail) {
        this.avail = avail;
    }

    @Basic
    @Column(name = "avail_with_limit" , nullable = true)
    public int getAvailWithLimit() {
        return availWithLimit;
    }

    public void setAvailWithLimit(int availWithLimit) {
        this.availWithLimit = availWithLimit;
    }

    @Basic
    @Column(name = "occ_date" )
    public Date getOccDate() {
        return occDate;
    }

    public void setOccDate(Date occDate) {
        this.occDate = occDate;
    }

    @Basic
    @Column(name = "rmclass", nullable = true, length = 16)
    public String getRmclass() {
        return rmclass;
    }

    public void setRmclass(String rmclass) {
        this.rmclass = rmclass;
    }

    @Basic
    @Column(name = "rmtype", nullable = false, length = 16)
    public String getRmtype() {
        return rmtype;
    }

    public void setRmtype(String rmtype) {
        this.rmtype = rmtype;
    }

    @Basic
    @Column(name = "rmtype_num", nullable = true)
    public Integer getRmtypeNum() {
        return rmtypeNum;
    }

    public void setRmtypeNum(Integer rmtypeNum) {
        this.rmtypeNum = rmtypeNum;
    }

    @Basic
    @Column(name = "limit_num", nullable = true)
    public Integer getLimitNum() {
        return limitNum;
    }

    public void setLimitNum(Integer limitNum) {
        this.limitNum = limitNum;
    }

    @Basic
    @Column(name = "ooo_num", nullable = true)
    public Integer getOooNum() {
        return oooNum;
    }

    public void setOooNum(Integer oooNum) {
        this.oooNum = oooNum;
    }

    @Basic
    @Column(name = "os_num", nullable = true)
    public Integer getOsNum() {
        return osNum;
    }

    public void setOsNum(Integer osNum) {
        this.osNum = osNum;
    }

    @Basic
    @Column(name = "villa_num", nullable = true)
    public Integer getVillaNum() {
        return villaNum;
    }

    public void setVillaNum(Integer villaNum) {
        this.villaNum = villaNum;
    }

    @Basic
    @Column(name = "sure_book_num", nullable = true)
    public Integer getSureBookNum() {
        return sureBookNum;
    }

    public void setSureBookNum(Integer sureBookNum) {
        this.sureBookNum = sureBookNum;
    }

    @Basic
    @Column(name = "unsure_book_num", nullable = true)
    public Integer getUnsureBookNum() {
        return unsureBookNum;
    }

    public void setUnsureBookNum(Integer unsureBookNum) {
        this.unsureBookNum = unsureBookNum;
    }

    @Basic
    @Column(name = "halt_num", nullable = true)
    public Integer getHaltNum() {
        return haltNum;
    }

    public void setHaltNum(Integer haltNum) {
        this.haltNum = haltNum;
    }

    @Basic
    @Column(name = "dep_num", nullable = true)
    public Integer getDepNum() {
        return depNum;
    }

    public void setDepNum(Integer depNum) {
        this.depNum = depNum;
    }
    @Basic
    @Column(name = "sale_num", nullable = true)
    public Integer getSaleNum() {
        return saleNum;
    }

    public void setSaleNum(Integer saleNum) {
        this.saleNum = saleNum;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        GcRmtypeAvailSync that = (GcRmtypeAvailSync) o;

        if (occDate != null ? !occDate.equals(that.occDate) : that.occDate != null) return false;
        if (rmclass != null ? !rmclass.equals(that.rmclass) : that.rmclass != null) return false;
        if (rmtype != null ? !rmtype.equals(that.rmtype) : that.rmtype != null) return false;
        if (rmtypeNum != null ? !rmtypeNum.equals(that.rmtypeNum) : that.rmtypeNum != null) return false;
        if (limitNum != null ? !limitNum.equals(that.limitNum) : that.limitNum != null) return false;
        if (oooNum != null ? !oooNum.equals(that.oooNum) : that.oooNum != null) return false;
        if (osNum != null ? !osNum.equals(that.osNum) : that.osNum != null) return false;
        if (villaNum != null ? !villaNum.equals(that.villaNum) : that.villaNum != null) return false;
        if (sureBookNum != null ? !sureBookNum.equals(that.sureBookNum) : that.sureBookNum != null) return false;
        if (unsureBookNum != null ? !unsureBookNum.equals(that.unsureBookNum) : that.unsureBookNum != null)
            return false;
        if (haltNum != null ? !haltNum.equals(that.haltNum) : that.haltNum != null) return false;
        if (depNum != null ? !depNum.equals(that.depNum) : that.depNum != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = occDate != null ? occDate.hashCode() : 0;
        result = 31 * result + (rmclass != null ? rmclass.hashCode() : 0);
        result = 31 * result + (rmtype != null ? rmtype.hashCode() : 0);
        result = 31 * result + (rmtypeNum != null ? rmtypeNum.hashCode() : 0);
        result = 31 * result + (limitNum != null ? limitNum.hashCode() : 0);
        result = 31 * result + (oooNum != null ? oooNum.hashCode() : 0);
        result = 31 * result + (osNum != null ? osNum.hashCode() : 0);
        result = 31 * result + (villaNum != null ? villaNum.hashCode() : 0);
        result = 31 * result + (sureBookNum != null ? sureBookNum.hashCode() : 0);
        result = 31 * result + (unsureBookNum != null ? unsureBookNum.hashCode() : 0);
        result = 31 * result + (haltNum != null ? haltNum.hashCode() : 0);
        result = 31 * result + (depNum != null ? depNum.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "l2r_rmtype", nullable = true, length = 32)
    public String getL2RRmtype() {
        return l2RRmtype;
    }

    public void setL2RRmtype(String l2RRmtype) {
        this.l2RRmtype = l2RRmtype;
    }

    public enum GcRmtypeAvailSync_ {
        occDate,rmclass,rmtype,rmtypeNum,limitNum,oooNum,
        osNum,villaNum,sureBookNum,unsureBookNum,haltNum,
        depNum,saleNum,realNum,l2RRmtype
    }
}
